<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/5/29 0029
 * Time: 上午 10:17
 */

namespace app\sports_admin\vaildate;


class ConstitutionType extends Base
{
    protected $rule = [
        'id'=>'require|isPositiveInteger',
    ];

    protected $message = [
        'id'=>'编号必须为整数',
    ];
    //添加
    public function insert()
    {
        $rule = [
            'title'=>'require',
            'grade_id'=>'require|array',
            'unit'=>'require'
        ];
        $msg = [
            'title'=>'请输入标题',
            'grade_id'=>'请选择年级',
            'unit'=>'请输入单位'
        ];
        self::goCheck($rule,$msg);
    }
    //修改
    public function update()
    {
        $rule = [
            'id'=>'require|integer',
            'title'=>'require',
            'grade_id'=>'require|array',
            'unit'=>'require'
        ];
        $msg = [
            'id'=>'请选择需要修改的信息',
            'title'=>'请输入标题',
            'grade_id'=>'请选择年级',
            'unit'=>'请输入单位'
        ];
        self::goCheck($rule,$msg);
    }
}